<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>房间管理</title>
</head>

<body>
  <!-- 房间列表 -->
  <div id="room_box">
    <% Object.keys(rooms).forEach(room=> { %>
      <div>
        <%= room %>
      </div>
      <a href="/<%= room %>">加入房间</a>
      <%}) %>
  </div>

  <!-- 创建房间表单 -->
  <form action="/room" method="post">
    <input name="room" type="text" required>
    <button type="submit">创建新房间</button>
  </form>
</body>
<script defer src="/socket.io/socket.io.js"></script>
<script defer src="./script.js"></script>

</html>